package com.example.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.example.interceptors.SsoAuthInterceptor;


/**
 * @author jiangwz
 * @create 2019/7/2.
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
    @Autowired
    SsoAuthInterceptor ssoAuthInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(ssoAuthInterceptor).addPathPatterns("/**");
    }
}
